#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>


struct arr {
	char name[20];
	int ar;


};

int qqw(const void* e1, const void* e2) {
	return strcmp((((struct arr*)e1)->name), (((struct arr*)e2)->name));
}
void sore() {
	struct arr s[] = { {"aaas",12},{"wefw",18},{"gfh",85}};
	for (int i = 0; i < 3; i++) {
		printf("%s,%d\n", (s + i)->name, (s + i)->ar);
	}
	int sz = sizeof(s) / sizeof(s[0]);
	qsort(s, sz, sizeof(s[0]),qqw);
	
	for (int i = 0; i < 3; i++) {
		printf("%s,%d\n", (s + i)->name, (s + i)->ar);
	}


}





int main() {
	
	sore();











	return 0;
}